package com.kye.express.business.deposit.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.kye.express.business.deposit.fragment.DepositConsumptionFragment;
import com.kye.express.business.deposit.fragment.DepositRechargeFragment;

/**
 * 预存运费-切换充值记录和消费记录Fragment的Adapter
 * <p>
 * Created by SkyYu on 2018/01/17
 */
public class DepositViewPagerAdapter extends FragmentPagerAdapter {

    public DepositViewPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        if (position == 0) {
            return DepositRechargeFragment.newInstance();
        } else {
            return DepositConsumptionFragment.newInstance();
        }
    }

    @Override
    public int getCount() {
        return 2;
    }
}